package com.u.tool;

import java.util.List;

import com.u.message.Message;

public class MessageUtil {

	public static int getNewMessage() {
		int num = 0;
		String sql = "select * from y_r.message where processed = 'false'";
		MysqlUtil db = new MysqlUtil();
		db.connection();
		List<Message> list = db.query(Message.class, sql);
		num = list.size();
		return num;
	}
	
	public static List<Message> GetMessageList(){
		String sql = "c";
		MysqlUtil db = new MysqlUtil();
		db.connection();
		List<Message> list = db.query(Message.class, sql);
		return list;
	}
}
